package com.newsnetwork.api.controller.admin;

import com.newsnetwork.grace.result.CommonJSONResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;

/**
 * @author: HuangDekai
 * @date: 2022/11/10 20:14
 * @version: 1.0
 * @since: jdk8
 * @description: 用户管理界面-用户管理相关 接口定义
 */

@Api(value = "用户管理相关的接口定义", tags = {"用户管理相关的接口定义 Controller"})
@RequestMapping("appUser")
public interface AppUserMngControllerApi {

    @ApiOperation(value = "查询所有网站用户", notes = "查询所有网站用户", httpMethod = "POST")
    @PostMapping("/queryAll")
    CommonJSONResult queryAll(@RequestParam String nickname,
                              @RequestParam Integer status,
                              @RequestParam Date startDate,
                              @RequestParam Date endDate,
                              @RequestParam Integer page,
                              @RequestParam Integer pageSize);

    @ApiOperation(value = "查看用户详情", notes = "查看用户详情", httpMethod = "POST")
    @PostMapping("/userDetail")
    CommonJSONResult userDetail(@RequestParam String userId);

    @ApiOperation(value = "冻结用户或者解冻", notes = "冻结用户或者解冻", httpMethod = "POST")
    @PostMapping("/freezeUserOrNot")
    CommonJSONResult freezeUserOrNot(@RequestParam String userId,
                                     @RequestParam Integer doStatus);
}
